python file hidden

35

# os module
import os

# you can use the current directory you are in
fileName = "myFile.txt"

# or a different one with a path
fileName = "C:/Windows/myFile.txt"

# send in cmd
os.system("attrib +h " + fileName)
# +h for hidden
# -h for unhidden

Comments

Submit
0 Comments